.class public Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyAdaptorFactory;
.super Lcom/burstly/lib/component/networkcomponent/AbstractAdaptorFactory;
.source "BurstlyAdaptorFactory.java"


# static fields
.field private static final ADAPTOR_NAME:Ljava/lang/String; = "adaptorName"

.field private static final BURSTLY_MANDATORY_ACTIVITIES:Ljava/util/List; = null
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private static final BURSTLY_MANDATORY_PERMISSIONS:Ljava/util/List; = null
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private static final BURSTLY_OPTIONAL_PERMISSIONS:Ljava/util/List; = null
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private static final FULL_CLASS_NAME:Ljava/lang/String; = "com.burstly.lib.component.networkcomponent.burstly.BurstlyAdaptorFactory"

.field private static final NETWORK_NAME:Ljava/lang/String; = "burstly"


# direct methods
.method static constructor <clinit>()V
    .locals 5

    .prologue
    const/4 v4, 0x2

    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 58
    new-array v0, v3, [Ljava/lang/String;

    const-string v1, "com.burstly.lib.component.networkcomponent.burstly.BurstlyFullscreenActivity"

    aput-object v1, v0, v2

    invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyAdaptorFactory;->BURSTLY_MANDATORY_ACTIVITIES:Ljava/util/List;

    .line 64
    new-array v0, v4, [Ljava/lang/String;

    const-string v1, "android.permission.INTERNET"

    aput-object v1, v0, v2

    const-string v1, "android.permission.WRITE_EXTERNAL_STORAGE"

    aput-object v1, v0, v3

    invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyAdaptorFactory;->BURSTLY_MANDATORY_PERMISSIONS:Ljava/util/List;

    .line 70
    new-array v0, v4, [Ljava/lang/String;

    const-string v1, "android.permission.READ_PHONE_STATE"

    aput-object v1, v0, v2

    const-string v1, "android.permission.ACCESS_WIFI_STATE"

    aput-object v1, v0, v3

    invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyAdaptorFactory;->BURSTLY_OPTIONAL_PERMISSIONS:Ljava/util/List;

    return-void
.end method

.method public constructor <init>()V
    .locals 2

    .prologue
    .line 77
    const-string v0, "com.burstly.lib.component.networkcomponent.burstly.BurstlyAdaptorFactory"

    const-string v1, "BurstlyAdaptorFactory"

    invoke-direct {p0, v0, v1}, Lcom/burstly/lib/component/networkcomponent/AbstractAdaptorFactory;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 78
    return-void
.end method


# virtual methods
.method public createAdaptor(Ljava/util/Map;)Lcom/burstly/lib/component/IBurstlyAdaptor;
    .locals 4
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "*>;)",
            "Lcom/burstly/lib/component/IBurstlyAdaptor;"
        }
    .end annotation

    .prologue
    .line 82
    .local p1, params:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;*>;"
    const-string v3, "adaptorName"

    invoke-interface {p1, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 83
    .local v1, key:Ljava/lang/String;
    const-string v3, "viewId"

    invoke-interface {p1, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    .line 84
    .local v2, viewId:Ljava/lang/Object;
    const-string v3, "context"

    invoke-interface {p1, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    .line 85
    .local v0, context:Ljava/lang/Object;
    if-eqz v1, :cond_3

    .line 86
    const-string v3, "BURSTLY_IMAGE"

    invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 87
    new-instance v3, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyImageAdaptor;

    check-cast v0, Landroid/content/Context;

    .end local v0           #context:Ljava/lang/Object;
    check-cast v2, Ljava/lang/String;

    .end local v2           #viewId:Ljava/lang/Object;
    invoke-direct {v3, v0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyImageAdaptor;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    .line 96
    :goto_0
    return-object v3

    .line 88
    .restart local v0       #context:Ljava/lang/Object;
    .restart local v2       #viewId:Ljava/lang/Object;
    :cond_0
    const-string v3, "BURSTLY_TEXT"

    invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 89
    new-instance v3, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;

    check-cast v0, Landroid/content/Context;

    .end local v0           #context:Ljava/lang/Object;
    check-cast v2, Ljava/lang/String;

    .end local v2           #viewId:Ljava/lang/Object;
    invoke-direct {v3, v0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    goto :goto_0

    .line 90
    .restart local v0       #context:Ljava/lang/Object;
    .restart local v2       #viewId:Ljava/lang/Object;
    :cond_1
    const-string v3, "BURSTLY_SCRIPT"

    invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 91
    new-instance v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyScriptAdaptor;

    check-cast v0, Landroid/content/Context;

    .end local v0           #context:Ljava/lang/Object;
    check-cast v2, Ljava/lang/String;

    .end local v2           #viewId:Ljava/lang/Object;
    invoke-direct {v3, v0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyScriptAdaptor;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    goto :goto_0

    .line 92
    .restart local v0       #context:Ljava/lang/Object;
    .restart local v2       #viewId:Ljava/lang/Object;
    :cond_2
    const-string v3, "BURSTLY_VIDEO"

    invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_3

    .line 93
    new-instance v3, Lcom/burstly/lib/component/networkcomponent/burstly/video/BurstlyVideoAdaptor;

    check-cast v0, Landroid/content/Context;

    .end local v0           #context:Ljava/lang/Object;
    check-cast v2, Ljava/lang/String;

    .end local v2           #viewId:Ljava/lang/Object;
    invoke-direct {v3, v0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/video/BurstlyVideoAdaptor;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    goto :goto_0

    .line 96
    .restart local v0       #context:Ljava/lang/Object;
    .restart local v2       #viewId:Ljava/lang/Object;
    :cond_3
    const/4 v3, 0x0

    goto :goto_0
.end method

.method protected createInstance(Landroid/content/Context;Ljava/lang/String;)Lcom/burstly/lib/component/IBurstlyAdaptor;
    .locals 1
    .parameter "context"
    .parameter "viewId"

    .prologue
    .line 101
    const/4 v0, 0x0

    return-object v0
.end method

.method public validateManifest()Lcom/burstly/lib/util/ManifestValidator$ValidationResults;
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/content/pm/PackageManager$NameNotFoundException;
        }
    .end annotation

    .prologue
    .line 106
    sget-object v1, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyAdaptorFactory;->BURSTLY_MANDATORY_ACTIVITIES:Ljava/util/List;

    sget-object v2, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyAdaptorFactory;->BURSTLY_MANDATORY_PERMISSIONS:Ljava/util/List;

    sget-object v3, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyAdaptorFactory;->BURSTLY_OPTIONAL_PERMISSIONS:Ljava/util/List;

    invoke-static {v1, v2, v3}, Lcom/burstly/lib/util/ManifestValidator;->customValidate(Ljava/util/List;Ljava/util/List;Ljava/util/List;)Lcom/burstly/lib/util/ManifestValidator$ValidationResults;

    move-result-object v0

    .line 108
    .local v0, results:Lcom/burstly/lib/util/ManifestValidator$ValidationResults;
    const-string v1, "burstly"

    invoke-virtual {v0, v1}, Lcom/burstly/lib/util/ManifestValidator$ValidationResults;->setNetworkName(Ljava/lang/String;)V

    .line 109
    return-object v0
.end method
